<template>
  <!-- 对图片剪辑二次封装 -->
  <div>
    <img-cutter
      :label="'选择图片'"
      :boxWidth="700"
      :boxHeight="500"
      :rate="rate"
      v-on:cutDown="cutDown"
    >
      <a-button slot="openImgCutter">
        <a-icon type="upload" />
        {{ $t('pro.UploadFile.SelectPictures') }}
      </a-button>
    </img-cutter>
  </div>
</template>

<script>
import ImgCutter from "./ImgClipNative";
export default {
  components: {
    ImgCutter
  },
  methods: {
    //图片剪辑之后返回事件
    cutDown(file) {
      this.$emit("getImg", file);
    }
  },
  props: {
    rate: {
      type: String,
      default: "1:1"
    }
  }
};
</script>

